home *** CD-ROM | disk | FTP | other *** search
- Path: sage.cgd.ucar.edu!jadams
- From: jadams@sage.cgd.ucar.edu (James Adams)
- Newsgroups: comp.lang.c++
- Subject: C++ equivalents of fread(), fwrite(), fflush() ?
- Date: 26 Feb 1996 21:46:23 GMT
- Organization: National Center for Atmospheric Research
- Distribution: world
- Message-ID: <4gt9nf$lef@ncar.ucar.edu>
- Reply-To: jadams@sage.cgd.ucar.edu
- NNTP-Posting-Host: sage.cgd.ucar.edu
-
- Hello,
-
- I am converting some software I've written in C to C++ (mainly
- for the practice). I'd like to start using the C++ methods of reading
- and writing to files, and I've been amazed at the lack of info regarding
- this topic in the C++ books I've found.
-
- I've been able to determine that there is a <fstream.h> which
- makes available ofstream, ifstream, and fstream objects. I have yet to
- find any reference which explains how to use these objects. What I want
- is an explanation of what the member functions are for these classes,
- the parameters they take, etc.
-
- Essentially all I need to do is replace fread(), fwrite(), and
- fflush() with their C++ equivalents (I guess I need fopen() and fclose()
- equivalents as well). Please let me know if you know of a reference
- which explains these (an online reference would be heavenly), or if you
- have any suggestions as to what I should be searching for.
-
- Any suggestions are greatly appreciated !
-
-
- -James
- --
- ---------------------------------------------------------------------------
- James Adams Email: jadams@ucar.edu
- National Center for Atmospheric Research Phone: (303) 497-1356
- Boulder, Colorado Fax: (303) 497-1348
-
- WWW: http://www.cgd.ucar.edu/ccr/jadams/home.html
-